package com.cloud.utils;

import org.springframework.util.AntPathMatcher;

/**
 * 权限/白名单校验
 *
 * @author yzj
 */
public class AuthBlankUtils {

    // 路径匹配类
    public static boolean askUrlAuth(String pathUrl, String... filter) {
        AntPathMatcher matcher = new AntPathMatcher();
        for (String strUrl : filter) {
            if (matcher.match(strUrl, pathUrl)) {
                return true;
            }
        }
        return false;
    }

}
